﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using PPP.ViewModel.BaseModel;
using PPP.ViewModel;
using PPP.ViewModel.WindowModel;

namespace PPP.Selector {
    /// <summary>
    /// Style selector to select right docking manager style. 
    /// 
    /// <list type="bullet">
    /// <item>
    /// <term>Author</term>
    /// <description>Sebastian Will</description>
    /// </item>
    /// </list>
    /// 
    /// </summary>
    class PanesStyleSelector : StyleSelector {

        #region Properties

        /// <summary>
        /// The tool style
        /// </summary>
        public Style ToolStyle {
            get;
            set;
        }

        /// <summary>
        /// The file style
        /// </summary>
        public Style FileStyle {
            get;
            set;
        }

        #endregion

        #region Methods
        /// <summary>
        /// Select the style of the container object.
        /// </summary>
        /// <param name="item"></param>
        /// <param name="container"></param>
        /// <returns>Returns the style.</returns>
        public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container) {

            if (item is ToolViewModel)
                return ToolStyle;

            if (item is GalleryViewModel)
                return FileStyle;

            return base.SelectStyle(item, container);
        }

        #endregion
    }
}
